﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StyleMVVM.Data
{
	/// <summary>
	/// Interface representing basic Commit/RollBack functionality
	/// </summary>
	public interface IEditable : INotifyPropertyChanged
	{
		/// <summary>
		/// True if the object has any pending changes
		/// </summary>
		bool PendingChanges { get; }

		/// <summary>
		/// What editing mode is this object in
		/// </summary>
		EditingMode EditingMode { get; set; }

		/// <summary>
		/// Commit the edits to the object
		/// </summary>
		void Commit();

		/// <summary>
		/// Rollback the dits to the object
		/// </summary>
		void RollBack();
	}
}